window.onload=function () {
    var mySwiper = new Swiper ('#swiper-1', {
        loop: true,
        autoplay: 3000,
        // 如果需要分页器
        pagination: '#pagination1',
        createPagination:'false',
        paginationClickable :true,
        //grabCursor: true,
        // 如果需要前进后退按钮
        nextButton: '.arrow-left',
        prevButton: '.arrow-left',
    });
    document.getElementById("swiper-button-next").onclick=function () {
        mySwiper.swipeNext();
    }
    document.getElementById("swiper-button-prev").onclick=function () {
        mySwiper.swipePrev();
    }


    var Swiper2 = new Swiper ('#swiper-2', {
        slidesPerView: 4,
        loop: true,
        grabCursor: true,
        autoplay: 3000,
        // 如果需要分页器
        createPagination:'false',

        // 如果需要前进后退按钮
        nextButton: '#next2',
        prevButton: '#prev2',
    });

    document.getElementById("next2").onclick=function () {
        Swiper2.swipeNext();
    }
    document.getElementById("prev2").onclick=function () {
        Swiper2.swipePrev();
    }

    var selected_li=$(".max-wrap .nav .nav-table .table-wrap>.selected");
    function gt_change1(){
        if(selected_li.children(".li-wrap").length>0){
            selected_li.children(".gt").addClass("select");
        } else{
            selected_li.children(".gt").addClass("no-select");
        }
    }
    gt_change1();
    $(".max-wrap .nav .nav-table .table-wrap .parent>.gt").addClass('select');

    $(".header_two .first-ul .first-ulli").hover(function(){
        var that=$(this);
        timer = setTimeout(function () {
            //that.find('ul').slideDown(200);
            that.children(".second-ul").slideDown(200);
        }, 200);
    },function () {
        var that=$(this);
        that.children(".second-ul").slideUp(200);
        clearTimeout(timer);
    });
}
